package com.foreknow.mapping;

import com.foreknow.bean.Dept;

import java.sql.ResultSet;
import java.sql.SQLException;

public class DeptMapping implements EntityMapping{
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Dept dept = new Dept();
        dept.setDeptno(rs.getInt("deptno"));
        dept.setDname(rs.getString("dname"));
        dept.setLoc(rs.getString("loc"));
        return dept;
    }
}
